﻿--获取入职员工信息
CREATE proc [dbo].[proc_Employee_Entry_GetItem_EId]

(
	@eid int
)
as
	select
		top 1  
		id,
		eid,
		(select ENumber from Employee E where EId=E.Id) as ENumber,
		(select ETempNumber from Employee E where EId=E.Id) as ETempNumber,
		(select EName from Employee E where EId=E.Id) as EName,
		(select Sex from Employee E where EId=E.Id) as Sex,
		(select IDCard from Employee E where EId=E.Id) as IDCard,
		(select CompanyId from Employee E where EId=E.Id) as CompanyId,
		(select CompanyName from Company where id=(select companyid from employee E where EId=E.Id)) as CompanyName,
		TDepartmentId as DepartmentId,
		(select DName from Department where id=TDepartmentId) as DName,
		TPCompanyId as PCompanyId,
		TPostCategory as PostCategory,
		TPostId as PostId,
		(select PostName from Post where id=TPostId) as PostName,
		TGradeId as GradeId,
		(select Title from Grade where id=TGradeId) as GradeName,
		(select title from post_category where id=(select postcategory from Post where id= TPostId)) as PostCategory,
		TPluralist as Pluralist,
		TRtx as Rtx,
		TRuzhiDate as RuzhiDate,
		TWageNumber as WageNumber,
		TWageCardNo as WageCardNo,
		TEnumber as Enumber,
		TProbationFrom,
		TProbationTo,
		AuditTime,
		(select ename from employee where username=Proposer) as Proposer,
		AuditPerson,
		Appliontime
	from
		employee_entry
	where
		eid=@eid